{include file="./public/static/block/admin/head.html"}
{include file="./public/static/block/admin/nav.html"}
<!--/. NAV TOP  -->
{include file="./public/static/block/admin/leftNav.html"}
<!-- /. NAV SIDE  -->
<div id="page-wrapper">
    <div id="page-inner">
        <div class="row">
            <div class="col-md-12">
                <h1 class="page-header">
                    广告管理 <small>用于管理广告信息</small>
                </h1>

            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">
             广告列表
             <div style="float: right;padding-top:5px;"><a style="padding: 5px 20px;background: #32C2CD;color: #fff;border-radius: 5px;" href="{:url('adv/add')}">新增广告</a></div>
         </div>
         <div style="padding:15px;overflow: hidden;">
             <form action="{:url('adv/index')}" method="post">
                <input style="padding:0 5px;display: block;height:30px;float: left;" type="input" name="search" value="{$search}" placeholder='查询广告名称或ID'>
                <input style="outline: none;border:none;background: #32C2CD;color:#fff;padding:0 15px;display: block;float: left;height:30px;margin-left: 10px;" type="submit" name="提交">
            </form>
        </div>
        <div class="panel-body">
         <div class="table-responsive" style="overflow: hidden;">
         <style type="text/css">
                    thead tr th {
                        text-align: center;
                    }
                    tbody tr td{
                        text-align: center;
                        vertical-align: middle !important;
                    }
                    tbody tr td img{
                        width: 100px;
                        height:auto;
                    }
                </style>
            <table class="table table-striped table-bordered table-hover dataTable no-footer" id="dataTables-example" aria-describedby="dataTables-example_info">
                <thead>
                    <tr role="row">
                        <th class="sorting_asc" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending" aria-sort="ascending" style="width: 148px;">广告ID</th>
                        <th class="sorting_asc" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending" aria-sort="ascending" style="width: 148px;">广告位置</th>
                        <th class="sorting_asc" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Rendering engine: activate to sort column ascending" aria-sort="ascending" style="width: 148px;">广告标题</th>
                        <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 209px;">封面图</th>
                        <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending" style="width: 88px;">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {volist name='list' id='adv'}
                    <tr class="gradeA odd">
                        <td class="sorting_1">{$adv.adv_id}</td>
                        <td class="sorting_1">{$adv.cate_id|get_cate_name}</td>
                        <td class="sorting_1">{$adv.title}</td>
                        <td class=" "><img style="width: 150px" src="{$adv.cover|get_img_url}"></td>
                        <td class="center ">
                            <div style="width:80px;text-align: center;margin: auto;">
                                <a href="{:url('adv/edit',['adv_id'=>$adv.adv_id])}">修改</a> |
                                <a href="{:url('adv/delete',['adv_id'=>$adv.adv_id])}">删除</a>
                            </div>
                        </td>
                    </tr>
                    {/volist}
                </tbody>
            </table>
            <div style="height: 54px">
                <div style="margin: 20px 0;border-radius: 4px;float: right;line-height: 34px;padding-left: 20px;">共{$total}条数据</div>
                <style type="text/css">
                    .pagination{
                        float: right;
                    }
                </style>
                {$list->render()} 
            </div>

        </div>

    </div>
</div>





</div>

</div>
<!-- /. PAGE WRAPPER  -->






{include file="./public/static/block/admin/foot.html"}